<template>
  <div v-if="tracks.length !== 0" class="goods-info">
    <div class="info-list" v-for="(item, i) in tracks" :key="i">
      <div class="info-desc">{{item.al.name}}</div>
      <img :src="item.al.picUrl" alt="" @load="goodsInfoImageLoad">
    </div>
  </div>
</template>

<script>
  export default {
    name: 'DetailGoodsInfo',
    props: {
      tracks: {
        type: Array,
        default() {
          return []
        }
      }
    },
    methods: {
      goodsInfoImageLoad() {
        this.$emit("goodsInfoImageLoad")
      }
    }
  }
</script>

<style scoped>
  .goods-info {
    padding: 20px 5px;
    border-bottom: 5px solid #eee;
    font-size: 13px;
  }

  .info-list {
    height: 320px;
    overflow: hidden;
    text-align: center;
    margin: 15px 0;
  }

  .info-list img {
    height: 100%;
    margin-top: 5px;
  }
</style>